Field of the Invention
The present invention relates to a method and apparatus for checking fine defects occurring in a pattern to be checked (check pattern) by comparing the check pattern with a reference pattern, and, more particularly, to a method of and apparatus for checking defects occurring in a two-dimensional pattern such as a circuit pattern of a printed circuit board, an IC, or the like.
A conventional method of checking defects occurring in a two-dimensional pattern is binary comparison checking which checks defects by comparing binary check pattern data with binary reference pattern data. According to this method, a check pattern is photographed by an image pickup apparatus. Then, the image formed by light rays reflected by or transmitted through the check pattern is divided into small pixels. The density or brightness (to be simply referred to as a density of a pixel hereinafter) of reflected or transmitted light rays constituting each pixel is converted into a binary value. Thus, the image is converted into binary pattern data as an aggregation of the pixels having values 1 and 0. Similarly, a reference pattern is converted into binary pattern data according to the image or design data. Both the binary pattern data obtained in this manner are compared with each other, and defects in the check pattern are checked. In the binary comparison checking, when an image of a check pattern is divided into pixels, a defect region is not completely divided into pixels. In other words, the image is only divided into pixels such that part of the defect region occupies part of a pixel. Therefore, defects cannot be accurately detected. That is, in the binary comparison checking, theoretically, a defect smaller than several pixels cannot be detected. Such a problem can be solved by minimizing a pixel unit. However, as the pixel unit is decreased, a data capacity is increased, and hence a longer time is required to process data. Even if all the defects may be defined by pixels, it is apparent that defects cannot be accurately checked when a positioning error is present between check pattern data and reference pattern data. That is, when a positioning error, i.e., a positional deviation, is present between the check pattern data and the reference pattern data, this error must be corrected. In correction, a given pixel of the check pattern data is required to be compared with a corresponding pixel of the reference pattern data and each of its peripheral pixels in addition to comparison between the pixels of the check pattern data and the corresponding pixels of the reference pattern data. For example, when a positioning error corresponding to one pixel is present between the check pattern data and the reference pattern data, a given pixel of the check pattern data is compared with a corresponding pixel of the reference pattern data and each of its peripheral pixels. If the given pixel of the check pattern data coincides with any one of the corresponding pixels of the reference pattern data and the peripheral pixels, it is determined that no defect is present in the given pixel of the check pattern data. According to such a method of correcting a positioning error, however, when defects successively occur in a given pixel of check pattern data and its adjacent pixels, any one of the pixels might not be judged defective, and hence a defect having a size smaller than twice that of a positioning error might not be found. In any case, during binary comparison checking, fine defects in a check pattern cannot be accurately detected.